package com.zzt.community.dao;

import com.zzt.community.entity.User;
import org.apache.ibatis.annotations.Mapper;

/**
 * Classname: UserMapper
 * Package: com.zzt.community.dao
 * Description:
 *
 * @Author:zzt
 * @Create: 2024/3/3-23:29
 * Version:
 */

@Mapper
public interface UserMapper {
    //根据ID查用户
    User selectById(int id);
    //根据名称查用户
    User selectByName(String username);
    //根据邮箱查用户
    User selectByEmail(String email);
    //插入
    int insertUser(User user);
    //修改用户状态
    int updateStatus(int id, int status);
    //更新头像
    int updateHeader(int id,String headerUrl);
    //更换密码
    int updatePassword(int id, String password);

}
